package cn.xiaoyu.android.activity.function.webview;

import android.util.Log;
import android.webkit.JavascriptInterface;

public class JsInterface {
    private static final String TAG = "JsInterface";

    private IJsBridge IJsBridge;

    public JsInterface(IJsBridge IJsBridge) {
        this.IJsBridge = IJsBridge;
    }

    @JavascriptInterface
    // 在子线程执行
    public void setValue(String value) {
        Log.d(TAG, "value = " + value);
        IJsBridge.setTextViewValue(value);
    }
}
